<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>影像审核详细信息</title>
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/easyui_my.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/css.css" />
<style type="text/css">
    .panel-title{ color: #444444;}
</style>
<script type="text/javascript" src="${ctx}/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="${ctx}/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx }/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${ctx}/js/common.js"></script>
<script type="text/javascript" src="${ctx}/js/jqzoom.pack.1.0.1.js"></script>
<style type="text/css">
#wfdd_chzn{
 display: none;
}
img {
    vertical-align: top;
}
</style>

</head>
<body class="easyui-layout">
<form id="gclsForm">
<div data-options="region:'center',border:false,cls:'yujszhidongshibie'" style="overflow-y :hidden;padding: 7px;">
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'north',border:false" style="height: 100px;">
			<table cellspacing="0" cellpadding="0" border="0" width="100%" class="dananguanglikuang" style="background: #C7EDCC;">
				     	 <tr>
				             <th align="right" height="26">号牌号码：</th>
				             <td>${info.hphmmc }</td>
				             <th align="right" height="26">车辆品牌：</th>
				             <td>${info.clpp1 }</td>
				             <th align="right" height="26">号牌种类：</th>
				             <td>${info.hpzlmc }</td>
				         </tr>
				     	 <tr>
				             <th align="right">车辆颜色：</th>
				             <td>${info.csysmc }</td>
				              <th align="right" height="26">车辆识别编号：</th>
				             <td>${info.clsbdh }</td>
				         </tr>
				         <tr>
				             <th align="right" height="26">发动机编号：</th>
				             <td>${info.fdjh }</td>
				             <th align="right" height="26">所有人：</th>
				             <td>${info.syr }</td>
				         </tr>
				    </table>
				    </div>
				    <div data-options="region:'center',border:false" id="tpStyle">
						<object id="playOcx"
								classid="clsid:BCB28301-A827-4DE4-BA67-623FAC960893"
								width="900"
								height="407">
						</object>
					</div>

</div>

</div>
	<div data-options="region:'east',border:false" style="width: 280px;overflow-y :auto;padding: 7px 7px 7px 2px;">
	    	<div class="easyui-layout" data-options="fit:true" style="border:1px solid #d2d2d2;">
				<div data-options="region:'center',border:false">
                    <input type="hidden" id="currentXh" value="${info.xh}"/>
					<%--该页面没有上一页、下一页翻页功能，所以这些信息没用

					<input type="hidden" id="startTime" value="${startTime}"/>
					<input type="hidden" id="endTime" value="${endTime}"/>
					<!-- 上一个机动车序号 -->
					<input type="hidden" id="preXh" value="${preXh}"/>
					<!-- 下一个机动车序号 -->
					<input type="hidden" id="nextXh" value="${nextXh}"/>
					<!-- 当前页数所有的机动车序号 -->
                    <input type="hidden" id="xhs" value="${xhs }"/>
                    <!-- 总页数 -->
                    <input type="hidden" id="totalPage" value="${pageInfo.totalPage}"/>
                    <!-- 当前页数 -->
                    <input type="hidden" id="currentPage" value="${pageInfo.currentPage}"/>
                     <!-- 每一页大小 -->
                    <input type="hidden" id="pageSize" value="${pageInfo.pageSize}"/>
					<!--当前数据在xhs中的位置-->
					<input type="hidden" id="currentIndex" value="${pageInfo.currentIndex}"/>--%>
					<p class="shipingjiemiangtanggr_top">
						采集记录
					</p>
					<ul class="shipingjiemiangtanggr_bottom" id="yxxxinfo">
					</ul>
				</div>
				<div data-options="region:'south',border:false" style="height: 75px;">
				     <div class="diyipaidhusnfhenfnf1">
	                    <a href="#" operaType="1" id="print" style=" float: right;margin:12px;" class="sousuocx">打印</a>
	                    <a href="#" operaType="2" id="download" style=" float: right;margin:12px;" class="sousuocx">下载</a>
	                </div>
		             <%--<div class="diyipaidhusnfhenfnf1" style="margin:2px;">
					    <c:choose>
	                        <c:when test="${nextXh ne '0'}"> 
	                         <a href="#" style=" float: right;" class="congzhim" onClick="javascript :pageJump('${nextXh }','pageDown');" style="visibility: visible;">下一条</a>
	                        </c:when>
	                        <c:otherwise>
	                            <a href="#" style=" float: right;" class="congzhim1">下一条</a>
	                        </c:otherwise>   
	                    </c:choose>
	                    <c:choose>
	                        <c:when test="${preXh ne '0'}"> 
	                            <a href="#" class="congzhim" style=" float: right; margin: 0 15px 0 0 ;" onClick="javascript :pageJump('${preXh}','pageUp');" style="visibility: visible;">上一条</a>
	                        </c:when>
	                        <c:otherwise>
	                            <a href="#" style=" float: right; margin: 0 15px 0 0 ;" class="congzhim1">上一条</a>
	                        </c:otherwise> 
                       </c:choose>
				</div>--%>
			</div>
        </div>
	    </div>
	    </form> 
</body>
<script type="text/javascript">

/*//查询信息
function pageJump(_xh,upOrDown){
	debugger;
	var currentPage=$('#currentPage').val();//获取当前页数
    var totalPage=$('#totalPage').val();//总页数
    var index=$('#currentIndex').val();//当前数据在当前分页页面中的位置
    var pageSize=$('#pageSize').val();//每一页展示的个数
	var currentXh=$('#currentXh').val();//当前机动车序号
    var xhs=$('#xhs').val();//当前分页所有的xh,已都好形式分隔开
    var xhArr=[];
    if(null!=xhs && undefined!=xhs){
        xhArr=xhs.split(',');
    }
    if(upOrDown=='pageUp'){
        if(index==0){
            index=Number(pageSize)-1;
            _xh='0,'+_xh+','+currentXh;
            currentPage=Number(currentPage)-1;//减一页
        }else{
            _xh=getPreOrNextXh(_xh,xhArr,upOrDown)+','+_xh+','+currentXh;
        }
    }else if(upOrDown=='pageDown'){
        //下一页
        if(index==Number(pageSize)-1){
            index=0;
            _xh=currentXh+','+_xh+',0';
            currentPage=Number(currentPage)+1;//加一页
        }else{
            index=Number(index)+1;
            _xh=currentXh+','+_xh+','+getPreOrNextXh(_xh,xhArr,upOrDown);
        }
    }
    var startTime=$('#startTime').val();//开始时间
    var endTime=$('#endTime').val();//结束时间
    var param={
    	xh:_xh,
    	xhs:xhs,
    	currentPage:currentPage,
    	pageSize:pageSize,
    	totalPage:totalPage,
    	currentIndex:index,
    	startTime:startTime,
    	endTime:endTime
    };
    parent.addTab("影像档案详情","///yxxxgl/findYxsqxzByxhFirstIn.htm?xh="+_xh+"&xhs="+xhs+
      "&currentPage="+currentPage+"&totalPage="+totalPage+
      "&pageSize="+pageSize+"&currentIndex="+index+"&startTime="+startTime+"&endTime="+endTime);
}*/

  $(function () {
	//加载图片信息
   	showYxxxList($("#currentXh").val());
   	$('#del,#download,#print').hide();
	//加载权限
	$.ajax({
		type:'POST',
        url:'${ctx}/audit/queryAuditInfo.htm',
        data:{
        	hphm:$.trim($('#hphmmc').val()),
        	hpzl:$.trim($('#hpzl').val()),
        	bussinessType:'1'
        },
        dataType:'json',
        success:function(data, textStatus, jqXHR){
        	if(null!=data && undefined!=data){
        		$.each(data,function(i,info){
        			var permissionType=info.permissionType;//权限类型  03 删除权限 02 下载权限 01 打印权限
        			if(permissionType=='01'){
        				$('#print').show();
        			}
        			if(permissionType=='02'){
                        $('#download').show();
        			}
        		});
                $('#print,#download').unbind('click').bind('click',function(){
                    debugger;
                    var operaType=$(this).attr('operaType');
                    if(operaType=='1'){
                        document.playOcx.PrintImage();
                    }else if(operaType=='2'){

                        if(confirm('确认下载图片?')){
                             var xh=$("#currentXh").val();
                            //window.location.href='${ctx}/yxxxgl/downloadSinglePic.htm?ids='+Ids;
                            window.location.href="${ctx}/yxxxgl/downloadSinglePic.htm?ids="+xh;

						}
                    }
                });
        	}
        }
	});
  });  
  
  
  function showYxxxList(vehicleXh) {
      debugger;
		$.ajax({
			type:'POST',
			url:'${ctx}/yxxxgl/findYxxxglRelation.htm',
			data:{xh:vehicleXh},
			dataType:'json',
			success:function(data, textStatus, jqXHR){
			    debugger;
				changeSrc(data[0].tpurl);
				$("#yxxxinfo").html("");
				var tableBodyStr = "";
				  if(data==""){
				      tableBodyStr+="<p class=\"xiangguanxinxzhifjiluyi1\" style=\"border:none;width:200px\">没有符合条件的查询结果！</p>";
				    }else{			    	
				      $.each(data,function(i,n){				    	  
						if (n.tpurl != "") {
							var str = n.tpurl;
							
							tableBodyStr += "<li>";
							//tableBodyStr += "<input type=\"checkbox\" name=\"checkbox1\" id=\""+n.tpid+"\" value=\""+n.tpid+"\">";
							tableBodyStr += "<img  onerror=\"javascript:this.src='${ctx}/images/tupiangsd.png'\" src=\""+str+"\" width=\"100%\" height=\"100\" style=\"float: left; margin: 0 5px 0 0;\" onclick=\"javascript:changeSrc(this.src)\"/>";
							tableBodyStr += "</li>";
						}else{
							tableBodyStr += "<li>";
							tableBodyStr += "<img onerror=\"javascript:this.src='${ctx}/images/tupiangsd.png'\" width=\"100%\" height=\"100\" style=\"float: left; margin: 0 10px 0 0;\" onclick=\"javascript:changeSrc()\"/>";
							tableBodyStr += "</li>";
						}
				      });
				    }
				$("#yxxxinfo").html(tableBodyStr);
			},
			error:function(XMLHttpRequest, textStatus, errorThrown){
				
			}
		});
	}
  function changeSrc(srcValue){
      debugger;
      document.playOcx.ImageUrl = srcValue;
      document.playOcx.WaterImage();

	}
</script>
</html>